package com.xiaoshuidi.cloud.module.system.convert.ocr;

import com.xiaoshuidi.cloud.module.system.controller.admin.ocr.vo.CompanyOcrVO;
import com.xiaoshuidi.cloud.module.system.service.ocr.dto.OcrDataDTO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

@Mapper
public interface OcrConvert {

    OcrConvert INSTANCE = Mappers.getMapper(OcrConvert.class);

    @Mappings({
            @Mapping(target = "leader",source = "legalPerson"),
            @Mapping(target = "businessLicence",source = "creditCode"),
            @Mapping(target = "address",source = "businessAddress")
    })
    CompanyOcrVO convert(OcrDataDTO ocrData);
}
